package io.demo02;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

/**
 * 缓存流来读取文件
 *
 * @author cyt
 * @create 2020-02-25 14:21
 */
public class BufferReaderDemo {

    public static void main(String[] args) throws IOException {
        //定义缓存对象
        BufferedReader br = null;
        br = new BufferedReader(new FileReader("e://io_writer.txt"));
        char[] chars = new char[1024];
        String line = null;
        while ((line = br.readLine()) != null) {
            System.out.println("" + line);
        }
    }
}
